import React from 'react'
import {Button, Icon} from 'antd'
import { FormattedMessage } from 'react-intl'

const FlipPages = ({flipIds, flipTask}) => {
  return <div style={{paddingTop: '30px'}}>
    <Button type='primary' disabled={flipIds.previousId === -1} onClick={() => flipTask('previous')}>
      <Icon type='arrow-left' />
      <FormattedMessage id='上一个' />
    </Button>
    <Button type='primary' style={{float: 'right'}} disabled={flipIds.nextId === -1}
      onClick={() => flipTask('next')}>
      <FormattedMessage id='下一个' />
      <Icon type='arrow-right' />
    </Button>
  </div>
}

export default FlipPages
